package tests;

import common.Utils;
import org.openqa.selenium.By;

/**
 *  测试文章详情页 -- 只需要在首页列表即可
 */

public class Detail extends Utils {

    private static final String url = "http://110.41.148.165:13145/index.html"; //主页

    public Detail() {
        super(url);
    }


    public void detail() throws Exception {
        //1.进入文章详情页
        driver.findElement(By.cssSelector("#artical-items-body > div > div > div.col > div.text-truncate > a > strong")).click();
        //2.给文章进行点赞
        driver.findElement(By.cssSelector("#details_btn_like_count")).click();

        //3.
        driver.findElement(By.cssSelector("#nav_board_index > a")).click();

    }


}
